#!/usr/bin/ENV perl

use utf8;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1");

my $req = HTTP::Request->new(GET => 'http://search.cpan.org/search');
$req->content_type('application/x-www-form-urlencoded');
$req->content('query=libwww-perl&mod=dist');

my $res = $ua->request($req);

if ($res->is_success) {
	print $res->content;
} else {
	print $res->status_line, "\n";
}